package cn.javasea.patterns.googleEventBus.obv;

import cn.javasea.patterns.googleEventBus.service.NotificationService;
import com.google.common.eventbus.Subscribe;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class RegNotificationObserver{
    private NotificationService notificationService;

    @Subscribe
    public void handleRegSuccess(Long userId) {
        notificationService.sendInboxMessage(userId, "xxx");
    }
}
